package chapterfour;

/**
 * Created by Think on 2016/3/17.
 */
import java.math.BigDecimal;
public class DecimalDemo {
    public static void main(String[] args){
        BigDecimal operand1=new BigDecimal("1.0");
        BigDecimal operand2=new BigDecimal("0.8");
        BigDecimal result=operand1.subtract(operand2 );
        System.out.println(result);
    }
}
/*
BigDecimal提供plus(),subtract(),multiply(),divide()等方法，可以进行加、减、乘、除等运算
 */